<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">学科信息查看</block>
		</cu-custom>
		<view class="cu-card case" v-for="item in subjectlist" :key="item.id">
			<view class="cu-item shadow">
				<view class="image">
					<image :src= "item.img_url"
					 mode="widthFix"></image>
					<view class="cu-tag bg-blue">{{item.name}}</view>
					
				</view>
				
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				subjectlist:[]
			}
		},
		methods: {
			GetSubject(){
				let that = this
				let data = {}
				uni.request({
				url:"http://localhost/stuapi/StuGetSubject",
				data:data,
				method:"POST",
				header:{'content-type':'application/x-www-form-urlencoded'},
				success: (res) => {
				let code = res.data.code;
				console.log(res.data.data)
				if(code == 200){
					this.subjectlist=res.data.data
				}
				else{
				}
				uni.showToast({ title:res.data.message, icon:"none",})
				}
				 });
			}
		},
		created() {
			this.GetSubject()
		}
	}
</script>

<style>

</style>
